package com.docker.sys.user.insideUserRole;

import com.docker.core.constant.APPIDConstant;
import com.docker.core.mvc.APPID;
import com.docker.core.mvc.Remark;
import com.docker.core.mvc.controller.BaseAPIController;
import com.jfinal.aop.Inject;

/**
 * @Author ldl
 * @Create 2020/09/23 023 09:59
 */
@Remark("用户角色管理")
@APPID(APPIDConstant.dum_web)
public class InsideUserRoleController extends BaseAPIController {

    @Inject
    private InsideUserRoleService insideUserRoleService;

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/09/23 023 10:00
     */
    @Remark("用户角色分配列表")
    public void tree() {
        renderAPISuccess(insideUserRoleService.tree(getPara("user_id")));
    }

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/11/24 024 13:54
     */
    @Remark("获取当前角色")
    public void now() {
        renderAPISuccess(insideUserRoleService.now(getPara("user_id")));
    }

    /**
     * @Param: []
     * @return: TODO
     * @Author: ldl
     * @Create: 2020/09/23 023 10:17
     */
    @Remark("修改用户角色")
    public void update() {
        renderAPI(insideUserRoleService.update(getPara("user_id"), getPara("role_id")));
    }

}
